package com.mkh.st.common.core.constant.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;
@Getter
@AllArgsConstructor
public enum UserStatusEnum {

	NORMAL(1, "正常"),
	LOCK(2, "锁定"),
	FREEZE(3, "冻结");


	private Integer status;

	private String value;

	public static UserStatusEnum get(Integer status){
		if (Objects.isNull(status)) {
			return null;
		}
		for (UserStatusEnum userStatusEnum : UserStatusEnum.values()){
			if (status.equals(userStatusEnum.status))  return userStatusEnum;
		}
		return null;
	}
}
